﻿<!doctype html>
<!-- 引入thymeleaf前缀 -->
<html xmlns:th="http://www.thymeleaf.org">
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>LLYNOSY 博客|mind ether</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="stylesheet" type="text/css" th:href="@{/css/myPagination.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/css/bootstrap.min.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/css/nprogress.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/css/style.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/css/font-awesome.min.css}">
    <link rel="apple-touch-icon-precomposed" th:href="@{/images/icon.png}">
    <link rel="shortcut icon" th:href="@{/images/favicon.ico}">

    <script th:src="@{/js/jquery-2.1.4.min.js}"></script>
    <script th:src="@{/js/myPagination.js}"></script>
    <script th:src="@{/js/nprogress.js}"></script>
    <script th:src="@{/js/jquery.lazyload.min.js}"></script>

    <!--[if gte IE 9]>
    <script th:src="@{/js/jquery-1.11.1.min.js}" type="text/javascript"></script>
    <script th:src="@{/js/html5shiv.min.js}" type="text/javascript"></script>
    <script th:src="@{/js/respond.min.js}" type="text/javascript"></script>
    <script th:src="@{/js/selectivizr-min.js}" type="text/javascript"></script>
    <![endif]-->
    <!--[if lt IE 9]>
    <script>window.location.href='upgrade-browser.html';</script>
    <![endif]-->
    <script type="text/javascript">

        $(function () {
            $("#searchBtn").click(function () {
                var keywords=$("#keyword").val();
                var url="/article/search/"+keywords+"/1"
                $(location).attr('href', url);
            })
        })

    </script>
</head>

<body class="user-select">
<header class="header">
    <nav class="navbar navbar-default" id="navbar">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-navbar" aria-expanded="false"> <span class="sr-only"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
            </div>
            <div class="collapse navbar-collapse" id="header-navbar">
                <form class="navbar-form visible-xs"  >
                    <div class="input-group">
                        <input type="text" name="keyword" class="form-control" placeholder="请输入关键字" maxlength="20" autocomplete="off">
                        <span class="input-group-btn">
                                <button class="btn btn-default btn-search" name="search" >搜索一下</button>
                            </span>
                    </div>
                </form>
                <ul class="nav navbar-nav navbar-right">
                    <li><a data-cont="LLYNOSY博客" title="LLYNOSY博客" style="font-size:22px" href="/">首页</a></li>
                    <li th:each="tag :${allTags}"><a  th:title="${tag.cnname}" style="font-size:22px" th:href="@{|/article/tag/${tag.engname}|}" th:text="${tag.cnname}">列表页</a></li>
                    <li id="manual"><a data-cont="关于我" title="关于我" style="font-size:22px" href="/about-me" draggable="false">关于我</a></li>
                </ul>
            </div>
        </div>
    </nav>
</header>
<section class="container">
    <div class="content-wrap">
        <div class="content">
            <article class="excerpt-minic excerpt-minic-index">
                <h2>
                    <span class="red">【推荐】</span><a target="_blank" th:href="@{|/show/${recommendArticle.id}.html|}" th:title="${recommendArticle.title}"><span th:text="${recommendArticle.title}"></span></a>
                </h2>
                <p class="note" th:text="${recommendArticle.intro}"></p>
            </article>
            <div class="title">
                <h3>最新发布</h3>
            </div>

            <article class="excerpt excerpt-1" th:each="toparticle :${pageArticleList.rows}">
             <!--   <a class="focus" href="http://www.muzhuangnet.com/show/711.html" th:title="${toparticle.title}" target="_blank" draggable="false"><img class="thumb" data-original="http://www.muzhuangnet.com/upload/201706/26/201706261417213246.jpg" src="http://www.muzhuangnet.com/upload/201706/26/201706261417213246.jpg" alt="线程安全测试 ijl" draggable="false" style="display: inline;"></a>-->
                <header>
                    <a class="cat" th:href="@{|/article/tag/${toparticle.tag}|}" th:title="${toparticle.tag}" draggable="false" th:text="${toparticle.tag}">Java<i></i></a>
                    <h1>
                        <a  th:href="@{|/article/${toparticle.id}.html|}"  th:title="${toparticle.title}" th:text="${toparticle.title}" target="_blank" draggable="false"></a>
                    </h1>
                </header>
                <p class="meta">
                    <time class="time" th:text="${toparticle.createtime}"><i class="glyphicon glyphicon-time"></i> 2019-11-30</time>
                    <span class="views"><i class="glyphicon glyphicon-eye-open"></i> <span th:text="${toparticle.visits}"></span></span>
                    <a class="comment" href="http://www.muzhuangnet.com/show/711.html#comment" title="评论" target="_blank" draggable="false"><i class="glyphicon glyphicon-comment"></i> <span th:text="${toparticle.comment}"></span></a>
                </p>
                <p class="note" style="font-size: large" th:text="${toparticle.title}"></p>
            </article>
            <div id="pagination" class="pagination"></div>
            <!--<nav class="pagination" style="display: none;">-->
                <!--<ul>-->
                    <!--<li class="prev-page"></li>-->
                    <!--<li class="active"><span>1</span></li>-->
                    <!--<li><a href="?page=2">2</a></li>-->
                    <!--<li class="next-page"><a href="?page=2">下一页</a></li>-->
                    <!--<li><span>共 2 页</span></li>-->
                <!--</ul>-->

            <!--</nav>-->
        </div>

    </div>
    <aside class="sidebar">
        <div class="fixed">
            <div class="widget widget_search">
                <div class="navbar-form" >
                    <div class="input-group">
                        <input type="text" name="keyword" id="keyword" class="form-control" size="35" placeholder="请输入关键字" maxlength="25" autocomplete="off">
                        <span class="input-group-btn">
                                <button class="btn btn-default btn-search" name="search"  id="searchBtn" type="submit">搜索一下</button>
                         </span>
                    </div>
                </div>
            </div>
        </div>
        <div class="widget widget_hot">
            <h3>最多评论文章</h3>
            <ul>

                <li th:each="article :${topCommentList}">
                    <a th:title="${article.title}" th:href="@{|/article/${article.id}.html|}" draggable="false">
                            <!--<span class="thumbnail">-->
                                <!--<img class="thumb" data-original="http://www.muzhuangnet.com/upload/201610/18/201610181739277776.jpg" src="http://www.muzhuangnet.com/upload/201610/18/201610181739277776.jpg" alt="用DTcms做一个独立博客网站（响应式模板）" draggable="false"></span>-->
                            <span class="text" th:text="${article.title}"></span><span class="muted">
                                <i class="glyphicon glyphicon-time"></i>
                                <span th:text="${article.createtime}"></span>
                            </span><span class="muted"><i class="glyphicon glyphicon-eye-open"></i><span th:text="${article.visits}"></span></span>
                    </a>
                </li>
                <li> <a href="http://www.harlanc.vip/"><img src="http://www.harlanc.vip/generatepic?userid=248c08f1-1b26-4f7a-9935-2f5cdabc1f13" alt="Page Counter" border="0"></a></li>
            </ul>
        </div>
        <img th:src="@{/images/slogan.jpg}">
    </aside>
</section>
<footer class="footer">
    <div class="container">
        <p>本站[<a href="http://www.llynosy.com/">LLYNOSY博客]</a>&nbsp;Powered By LLYNOSY&nbsp; &nbsp; </p>
    </div>
    <div id="gotop"><a class="gotop"></a></div>
</footer>
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/jquery.ias.js}"></script>
<script th:src="@{/js/scripts.js}"></script>
<script id="pagenition" type="text/javascript" th:inline="javascript">

    var url= window.location.href;
    var start=url.indexOf("page/")+5;
    var nextPage=url.substring(start,url.length);
    if(isNaN(nextPage)){
       nextPage=1;
    }
    new Page({
        id: 'pagination',
        curPage: nextPage, //初始页码
        pageTotal: [[${pageArticleList.total}]], //总页数
        pageAmount: [[${pageArticleList.pageSize}]], //每页多少条
        dataTotal: [[${pageArticleList.size}]], //总共多少条数据
        pageSize: 5, //可选,分页个数
        showPageTotalFlag: true, //是否显示数据统计
        showSkipInputFlag: true, //是否支持跳转
        getPage: function(page) {
            //获取当前页数
            var cpage=this.curPage;
          window.location.href="/page/"+page;
        }
    })
</script>
</body>
</html>
